home *** CD-ROM | disk | FTP | other *** search
/ Workbench Design / WB Collection.iso / anzeigeprogramme / fastview / install < prev    next >
Text File  |  1996-04-07  |  6KB  |  262 lines

  1. ; $VER: Install FastView 2.0 (24.10.95)
  2. ; Script to install FastView 2.0
  3. ; Written by Edmund Vermeulen
  4.  
  5.  
  6. ;=============================================================================
  7. ; make sure we are running at least V37
  8.  
  9. (if (< (/ (getversion) 65536) 37)
  10.     (abort "You must be using Kickstart 2.04 or higher to use FastView.")
  11. )
  12.  
  13.  
  14. ;=============================================================================
  15. ; delete old FastView from C:
  16.  
  17. (set oldfastview "C:FastView")
  18.  
  19. (if (exists oldfastview)
  20.     (delete oldfastview
  21.        (prompt "Do you want to delete the old version of FastView "
  22.                "from the C: directory?\n\n"
  23.                "It is not needed any more because FastView is now a "
  24.                "Workbench application."
  25.        )
  26.        (help "You should delete the old FastView program from your "
  27.              "C: directory because the new version is now a "
  28.              "Workbench application.\n\n"
  29.              "If you still want to be able to simply use FastView "
  30.              "from the CLI, you should copy it to a directory that "
  31.              "is part of your search path, such as SYS:Utilities."
  32.        )
  33.        (confirm)
  34.     )
  35. )
  36.  
  37.  
  38. ;=============================================================================
  39. ; ask which cpu version to install
  40.  
  41. (set cpuversion
  42.    (askchoice
  43.       (prompt "Which version do you want to install?")
  44.       (choices "68000 version" "68020 version")
  45.       (if (< (database "cpu") "68020")
  46.           (default 0)
  47.           (default 1)
  48.       )
  49.       (help "If you've got an Amiga with 68020 or higher processor "
  50.             "you can choose to install the version that is "
  51.             "specially optimized for those processors, otherwise "
  52.             "you should choose to install the 68000 version."
  53.       )
  54.    )
  55. )
  56.  
  57.  
  58. ;=============================================================================
  59. ; ask where FastView should be installed
  60.  
  61. (set fastview_dest
  62.    (askdir
  63.       (prompt "Where do you want to install the FastView program?")
  64.       (help "Select the directory where you want to install the "
  65.             "FastView program and its icon."
  66.       )
  67.       (default (set @default-dest "SYS:Utilities"))
  68.    )
  69. )
  70.  
  71. (set @default-dest fastview_dest)
  72.  
  73. ;=============================================================================
  74. ; copy FastView
  75.  
  76. (copylib
  77.    (prompt "Install FastView?")
  78.    (help @copylib-help)
  79.    (source
  80.       (tackon 
  81.          (if (= cpuversion 0)
  82.              ("68000")
  83.              ("68020")
  84.          )
  85.          "FastView"
  86.       )
  87.    )
  88.    (dest @default-dest)
  89.    (infos)
  90.    (confirm)
  91. )
  92.  
  93.  
  94. ;=============================================================================
  95. ; ask if the JPEG Codec Class should be installed
  96.  
  97.  
  98. (if (not
  99.        (askbool
  100.           (prompt "Do you wish to install the Tower JPEG Codec Class?\n\n"
  101.                   "It is needed by FastView to view JPEG pictures."
  102.           )
  103.           (help "FastView relies on Christoph Feck's Tower JPEG Codec "
  104.                 "Class to view JPEG images.\n\n"
  105.                 "If you want to be able to view JPEG pictures you must "
  106.                 "install it."
  107.           )
  108.           (default 1)
  109.        )
  110.     )
  111.     (exit)
  112. )
  113.  
  114.  
  115. ;=============================================================================
  116. ; run the JPEG Codec Class install script
  117.  
  118. ;
  119. ; $VER: jpeg_cdc_install 1.0 (16.12.94)
  120. ;
  121. ; Copyright (c) 1994 Christoph Feck, TowerSystems.
  122. ;
  123.  
  124. ;****************************************************************************
  125. ;
  126. ; English texts
  127. ;
  128.  
  129. (set #bad-kick (cat "You must have AmigaOS Release 2.04 or newer to be able "
  130.     "to use the JPEG Codec.")
  131. )
  132.  
  133. (set #temp-file (cat "    To decode certain JPEG images, the Codec needs "
  134.     "a large amount of memory.\n    If the required storage is not available "
  135.     "in main memory, the Codec will create a temporary file on your "
  136.     "harddisk.  The volume on which this file is created should have enough "
  137.     "free space (about 4 meg).\n    A temporary file is usually only "
  138.     "required, if you want to quantize JPEG images to 256 colors.\n\n"
  139.     @askdir-help)
  140. )
  141.  
  142. (set #make-assign (cat "    The logical assignment \"JPEGTMP:\" is used to "
  143.     "refer to the temporary directory.\n    In order to make this assignment "
  144.     "available on every reboot, an \"Assign\" command has to be added to "
  145.     "your \"user-startup\" file.\n\n" @startup-help)
  146. )
  147.  
  148. ;****************************************************************************
  149. ;
  150. ; Setup
  151. ;
  152.  
  153. ;(set @default-dest "")
  154.  
  155. (set libs-dest "LIBS:")
  156. (set class-dest "SYS:Classes")
  157.  
  158. (if (not (exists class-dest))
  159.     (set class-dest "LIBS:")
  160. )
  161.  
  162. (complete 0)
  163.  
  164. (if (< (/ (getversion) 65536) 37)
  165.     (abort #bad-kick)
  166. )
  167.  
  168. ;****************************************************************************
  169. ;
  170. ; Welcome
  171. ;
  172.  
  173. ;(welcome)
  174.  
  175. (message "\n\n\nTower JPEG Codec Class\n\nCopyright © 1994 Christoph "
  176.     "Feck, TowerSystems\nAll Rights Reserved.\n\n\n\nPlease refer to the "
  177.     "documentation for details."
  178. )
  179.  
  180. ;****************************************************************************
  181. ;
  182. ; JPEGTMP: assignment
  183. ;
  184.  
  185. (set has-temp 0)
  186.  
  187. (if (exists "JPEGTMP:" (noreq))
  188.     (
  189.         (set has-temp 1)
  190.         (if (= "RAM" (getdevice "JPEGTMP:"))
  191.             (set has-temp 0)
  192.         )
  193.     )
  194. )
  195.  
  196. (if (= has-temp 0)
  197.     (
  198.         (set jpeg-tmp (askdir (help #temp-file) (prompt "Select a directory for temporary files, not in RAM:") (default "SYS:")))
  199.         (startup "JPEG Codec"
  200.             (help #make-assign)
  201.             (prompt "An assignment has to be added to your user-startup.")
  202.             (command "Assign JPEGTMP: \"" jpeg-tmp "\"")
  203.         )
  204.         (makeassign "JPEGTMP" jpeg-tmp)
  205.     )
  206. )
  207.  
  208. (complete 10)
  209.  
  210. ;****************************************************************************
  211. ;
  212. ; Install libraries and classes
  213. ;
  214.  
  215. (copylib
  216.     (help @copylib-help)
  217.     (prompt "Copying tower.library...")
  218.     (source "Libs/tower.library")
  219.     (dest libs-dest)
  220.     (confirm)
  221. )
  222.  
  223. (complete 30)
  224.  
  225. (copylib
  226.     (help @copylib-help)
  227.     (prompt "Copying codec.class...")
  228.     (source "Classes/codec.class")
  229.     (dest class-dest)
  230.     (confirm)
  231. )
  232.  
  233. (complete 50)
  234.  
  235. (copylib
  236.     (help @copylib-help)
  237.     (prompt "Copying picture.codec...")
  238.     (source "Classes/Codecs/picture.codec")
  239.     (dest (tackon class-dest "Codecs"))
  240.     (confirm)
  241. )
  242.  
  243. (complete 70)
  244.  
  245. (copylib
  246.     (help @copylib-help)
  247.     (prompt "Copying jpeg.codec...")
  248.     (source "Classes/Codecs/jpeg.codec")
  249.     (dest (tackon class-dest "Codecs"))
  250.     (confirm)
  251. )
  252.  
  253. ;****************************************************************************
  254. ;
  255. ; Exit
  256. ;
  257.  
  258. (run "Avail >NIL: FLUSH")
  259. (complete 100)
  260. (exit)
  261.  
  262.